import time,os,xlrd
from common.login import Login
from testcase.Resource_quiry import quiry
from testcase.Resource_add import Add
from testcase.home_navigation import Navigation


class do_case:
    # def __init__(self):
    #     self.st = Login()
    #     self.driver = self.st.driver

    def read_excel_test(self,sheets):
        # 文件路径

        filename =  "D:\\python\\WoniuBoss\\data\\w-case.xls"
        # 打开文件
        excel = xlrd.open_workbook(filename)
        # 打开对应的表
        sheet = excel.sheet_by_name(sheets)
        # 获取行数
        r_num = sheet.nrows
        print(f'共有{r_num}行')
        # 循环读取，每一行完成一个用例
        list = []
        for r in range(1, r_num):
            # 　读取一行的内容
            row_info = sheet.row_values(r)
            list.append(row_info)
            #print(list[0])
            return list[0],sheet,r_num
            #类和方法








if __name__ == '__main__':
    start = do_case()
    start.read_excel_test('case')
